import sys
import json
import base64


def f_encode(line):
    decode = base64.b16decode((base64.b64decode(line)))
    result = {'result_name': str(decode, encoding='utf8')}
    return result


if __name__ == '__main__':
    test_str = '上海'
    bytes_str = test_str.encode('utf-8')
    encode = base64.b64encode(base64.b16encode(bytes_str))
    print(encode)
    # for line in sys.stdin:
    #     value = json.loads(line)
    #     first_arg = value['argument_1']
    #     decode = base64.b16decode((base64.b64decode(first_arg)))
    #     result = {'result_name': str(decode, encoding='utf8')}
    #     print(json.dumps(result), end='\n')
    #     sys.stdout.flush()
    # # print(f_encode('RTRCODhBRTZCNUI3'))



